/**
* Author:MangoDai
*
* Date:${Date}
*
* Description:
*
**/

#include <iostream>
using namespace std;

int main(){
int n,j;
cin >> n;
if (n==1){
cout << 1;	
return 0;
} 
int times = 0;
while(1){
j = n % 2;
if (j != 0){ // jishu
n = 3*n+1;
}
n = n/2;
times++;
if (n == 1){
cout << times;	
break;
}
}
}
